package com.finance.system.service;


import com.finance.base.exception.BaseException;
import com.finance.system.bean.pojo.Organization;

import java.util.List;
import java.util.Set;


/**
 * 配送机构业务接口
 * Created by CBWL on 2017/3/17.
 */
public interface IOrganizationService {

    List<Organization> listAll();

    /**
     * 根据名字或者code 模糊查询组织机构
     * */
    List<Organization> listByNameOrCode(String key);

    Organization getById(Long id);

    Organization getByCode(String code);

    boolean add(Organization organization) throws BaseException;

    boolean update(Organization organization);

    boolean del(String uid, Long id);

    Set<Organization> parents(String code);

    String getCodeByName (String name);

}
